<template>
  <div>
    <location @mapclick="childClick"
              :aid="aid"
              :did="did"></location>
    <div>
      父组件父组件父组件父组件
    </div>
  </div>
</template>

<script>
import Location from './Location.vue'
export default {
  components: {
    location: Location,
  },
  methods: {
    childClick(data) {
      console.log('↓父组件收到↓')
      console.log(data)
    },
  },
  data() {
    return {
      aid: '1',
      did: '1',
    }
  },
  mounted() {
    // 向服务器请求获取陪护员id残疾人id后赋值给data
    this.did = 1
    this.aid = 1
  },
}
</script>

<style scoped>
</style>
